package cc.autoapi.pucong.auto.flow.core.flow.execNode.selfenum;


// FATAL > ERROR > WARN > INFO > DEBUG > TRACE
public enum LogLevelTypeEnum {

    FATAL(0),
    ERROR(1),
    WARN(2),
    INFO(3),
    DEBUG(4),
    TRACE(5);

    private Integer type;

    LogLevelTypeEnum(Integer type) {
        this.type = type;
    }

    public Integer getValue() {
        return type;
    }
    public String getName() {
        return name();
    }

    public LogLevelTypeEnum getItemByValue(Integer value) {
        LogLevelTypeEnum[] itemArr = LogLevelTypeEnum.values();
        if (value != null) {
            for (LogLevelTypeEnum item : itemArr) {
                if (value.equals(item.getValue())) {
                    return item;
                }
            }
        }
        return null;
    }
}
